ndrustfft
ndrustfft: n-dimensional complex-to-complex FFT, real-to-complex FFT and real-to-real DCT
This library is a wrapper for RustFFT
, RustDCT
and RealFft
that enables performing FFTs and DCTs of complex- and real-valued
data on n-dimensional arrays (ndarray).
ndrustfft provides Handler structs for FFT's and DCTs, which must be provided alongside with the arrays to the respective function (see below) . The Handlers implement a process function, which is a wrapper around Rustfft's process function with additional functionality. Transforms along the outermost axis are in general the fastest, while transforms along other axis' will create temporary copies of the input array.
Implemented transforms
Complex-to-complex
fft
: [ndfft
], [ndfft_par
]ifft
: [ndifft
],[ndifft_par
]
Real-to-complex
fft_r2c
: [ndfft_r2c
], [ndfft_r2c_par
],
Complex-to-real
ifft_r2c
: [ndifft_r2c
],[ndifft_r2c_par
]
Real-to-real
dct1
: [nddct1
],[nddct1_par
]dct2
: [nddct2
],[nddct2_par
]dct3
: [nddct3
],[nddct3_par
]dct4
: [nddct4
],[nddct4_par
]
Parallel
The library ships all functions with a parallel version which leverages the parallel abilities of ndarray.
Example
2-Dimensional real-to-complex fft along first axis
use ;
use ;
let = ;
let mut data = zeros;
let mut vhat = zeros;
for in data.iter_mut.enumerate
let mut fft_handler = new;
ndfft_r2c;
License: MIT